/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package ormsamples;

import org.orm.*;
public class DeleteBdcombustibleData {
	public void deleteTestData() throws PersistentException {
		PersistentTransaction t = orm.Bdprueba2PdsPersistentManager.instance().getSession().beginTransaction();
		try {
			orm.DAOFactory lDAOFactory = orm.DAOFactory.getDAOFactory();
			orm.dao.Tp_logDAO lormTp_logDAO = lDAOFactory.getTp_logDAO();
			orm.Tp_log lormTp_log = lormTp_logDAO.loadTp_logByQuery(null, null);
			// Delete the persistent object
			lormTp_logDAO.delete(lormTp_log);
			t.commit();
		}
		catch (Exception e) {
			t.rollback();
		}
		
	}
	
	public static void main(String[] args) {
		try {
			DeleteBdcombustibleData deleteBdcombustibleData = new DeleteBdcombustibleData();
			try {
				deleteBdcombustibleData.deleteTestData();
			}
			finally {
				orm.Bdprueba2PdsPersistentManager.instance().disposePersistentManager();
			}
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}
}
